package com.mc.lp.database.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.mc.lp.database.entity.type.RecordType;
/*
 * @author aphanda
 * @date Dec 13, 2014
 * @time 8:35:45 PM
 */

@Entity
@Table(name="RECOMMENDATION")
public class RecommendationEntity extends MicroCampusBaseEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Column(name = "STUDENT_ENTITY_ID")
	private Long studentEntity;

	@Column(name = "GRADE")
	private int gradeId;
	
	@Column(name = "TERM")
	private int termId;
	
	@Column(name = "YEAR")
	private Long year;

	@Column(name="RECOMMENDATION_TEXT")
	private String recommendation;
	
	@Column(name="RECOMMENDATION_TITLE")
	private String recommendationTitle;

	@Column(name="RECORD_TYPE_ID")
	private Long recordType;
	
	public Long getStudentEntity() {
		return studentEntity;
	}

	public void setStudentEntity(Long studentEntity) {
		this.studentEntity = studentEntity;
	}

	public int getGradeId() {
		return gradeId;
	}

	public void setGradeId(int gradeId) {
		this.gradeId = gradeId;
	}

	public Long getYear() {
		return year;
	}

	public void setYear(Long year) {
		this.year = year;
	}

	public String getRecommendation() {
		return recommendation;
	}

	public void setRecommendation(String recommendation) {
		this.recommendation = recommendation;
	}

	public int getTermId() {
		return termId;
	}

	public void setTermId(int termId) {
		this.termId = termId;
	}

	public String getRecommendationTitle() {
		return recommendationTitle;
	}

	public void setRecommendationTitle(String recommendationTitle) {
		this.recommendationTitle = recommendationTitle;
	}

	public RecordType getRecordType() {
		 return RecordType.getType(this.recordType);
	}

	public void setRecordType(RecordType recordType) {
		if (recordType == null) {
			this.recordType = null;
		} else {
			this.recordType = recordType.getId();
		}
	}
}
